<%--
  Created by IntelliJ IDEA.
  User: wty_5
  Date:  2018年8月17日,0017
  Time: 15:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>测试</title>
    <script src="static/js/jquery-3.3.1.min.js"></script>
</head>
<body>
<form action="checkNullServlet.do" method="post">
<input type="text" id="cangku" name="cangku" >
    <button type="submit" onclick="aa()">提交</button>
</form>
</body>
<script >
var flag=false;

    jQ.post()function aa() {

        flag=${sessionScope.flag};
        if (flag){
            alert("不能为空!")
        }
    }

</script>
</html>
